function newWorkShift(parentCalendarId, resourceId, oType)
{

openStdWin(prependOrgName('/SM/workplans/edit.aspx?id=&calendarId='+parentCalendarId+'&resourceId='+resourceId+'&oType='+oType+'&selecteddates='+document.frames['areaMonthlyCalendarFrame'].frames['MonthCalendar'].frmGrid.selectedDates.value+'&name=Working Hours&mode=New'), 'Calendar', 550, 540);
}

function editWorkShift(parentCalendarId, resourceId)
{

document.frames[0].frames['MonthCalendar'].crmMonthlyCalendarTopTable.EditSelectedEntity();
}

function newWorkDay(parentCalendarId, resourceId, oType)
{
if (openStdDlg(prependOrgName('/SM/workplans/Dialogs/timesheet.aspx?id=&calendarId='+parentCalendarId+'&resourceId='+resourceId+'&oType='+oType+'&selecteddates='+document.frames['areaMonthlyCalendarFrame'].frames['MonthCalendar'].frmGrid.selectedDates.value), null, 640, 500))
{

auto(CalendarRule);
}
}

function newTimeOff(parentCalendarId, resourceId)
{
if (openStdDlg(prependOrgName('/SM/workplans/Dialogs/timeoff.aspx?id=&calendarId='+parentCalendarId+'&resourceId='+resourceId+'&selecteddates='+document.frames['areaMonthlyCalendarFrame'].frames['MonthCalendar'].frmGrid.selectedDates.value), null, 550, 420))
{

auto(CalendarRule);
}
}
